﻿using System;
using System.Windows;
using System.Windows.Controls;

namespace TheOliver.DigitalSignage.Client.Windows
{
    public partial class ErrorWindow : ChildWindow
    {
        public ErrorWindow()
        {
            InitializeComponent();
        }

        private void OKButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = true;
        }

        private void CancelButton_Click(object sender, RoutedEventArgs e)
        {
            this.DialogResult = false;
        }

        public Exception Error
        {
            get { return null; }
            set
            {
                Exception exc = value;
                string message = exc.Message;
                message += Environment.NewLine;
                message += exc.StackTrace;
                _errorMessage.Text = message;
            }
        }
    }
}

